home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 April / macformat-049.iso / mac / Shareware Plus / Games / MINESWEEPER v3(FAT) Folder / Writing MineSweeper Pluggins < prev   
Encoding:
Text File  |  1997-01-27  |  7.4 KB  |  80 lines  |  [ttro/ttxt]

  1.                    Writing Your Own MineSweeper v3 PLUGGINS!!
  2.  
  3.         ABOUT MINESWEEPER PLUGGINS
  4.     If you are somewhat familiar with a resource editor, you can write your own
  5. MineSweeper Pluggins (allowing you to customize your own MineSweeping mood.)  We decided to implement this technology for two main reasons: there are many, many talented individuals on the Macintosh platform that really excel in the "artistic" areas; and we have had a pleater a of suggestions for a non-militant theme to this game.
  6.  
  7.         HOW DO THEY WORK?
  8.     MineSweeper initially loads all resources it needs to run at start-up.  One of the next things it does is checks it's pluggin folder for all pluggins.  It then sequentially goes through and replaces over existing pictures and icons it already loaded.  Also, sounds are added dynamically which allows the user to have as many pluggins with sounds that he/she wants.  MineSweeper will load, at a maximum, 25 pluggins.
  9.                         *NOTE*  
  10.                 If the user has multiple "icon" or "PICT" pluggins that duplicate each other's resource number, the one that was LAST read is the one that will be effective!
  11.     
  12.     HOW TO MAKE A PLUGGIN
  13.     Open your resource editor ( i.e. ResEdit or Resourcer ) and create a new file. You must ensure is the pluggin name contains the following string: "MINE-PLUGGIN".  For standardizing purposes please follow this format: "MINE-PLUGGIN…your pluggin name ". ( You can get the "…" character by holding down the option key and pressing the semi-colon key ).  You should also use the default icon for a Pluggin.  Copy this icon from any pluggins you may already have.     
  14.  
  15.     A SOUND PLUGGIN
  16.     All sound resources MUST be stored with a compression of "MACE6".  Failure to do this may cause the program to crash.  Also be reasonable with your sounds, sounds are literally stored in memory ( except the title track ) the entire time MineSweeper is running.  If your sound takes 100k, MineSweeper needs 100k more now to run - JUST FOR THAT SOUND.  It is highly recommended that you aim to create several small sounds rather than a few large ones.
  17.  
  18.     All sound effects must be stored starting at resource id 20, and be sequential.  For example if you have three sounds then you will have a 'snd ' resource 20, 21, and 22.  Again, ensure these are in "MACE6" format.
  19.  
  20.     You may also replace the standard game sounds.  Do this the same exact way as a sound effect but use these resource ids.
  21.  
  22.         10    .    .    .    .    .    .    Congratulations, You have Won!
  23.         11    .    .    .    .    .    .    When a tile is flagged.
  24.         12    .    .    .    .    .    .    When a tile is questioned.
  25.         13    .    .    .    .    .    .    When a tile is selected.
  26.         14    .    .    .    .    .    .    When a bomb is exposed.
  27.  
  28.     Finally, you may also replace the title track.  This is the sound that plays when the user starts the game.  This is not held in memory for very long, so you may be more liberal with resource size, but for download time you should try to keep it reasonable.  To put a title track 'snd ' in your pluggin, use resource id 999.
  29.  
  30.     A COLOR ICON PLUGGIN
  31.     You may change any of all of the game tiles with an icon pluggin.  You will need to create a resource of type 'cicn' and set the size to 20 pixels width and 20 pixels high.  If you do not set the size appropriately, MineSweeper will scale the icon and some distortion will occur.
  32.     Use the following resource ids for replacement tiles:
  33.  
  34.     128    .    .    .    .    .    .    .    An uncovered tile
  35.     129    .    .    .    .    .    .    .  A covered, unselected tile
  36.     130    .    .    .    .    .    .    .    A tile with the number 1 on it. 
  37.     131    .    .    .    .    .    .    .    A tile with the number 2 on it.
  38.     132    .    .    .    .    .    .    .    A tile with the number 3 on it.
  39.     133    .    .    .    .    .    .    .    A tile with the number 4 on it.
  40.     134    .    .    .    .    .    .    .    A tile with the number 5 on it.
  41.     135    .    .    .    .    .    .    .    A tile with the number 6 on it.
  42.     136    .    .    .    .    .    .    .    A tile with the number 7 on it.
  43.     137    .    .    .    .    .    .    .    A tile with the number 8 on it.
  44.     138    .    .    .    .    .    .    .    A bomb the user has just uncovered.
  45.     139    .    .    .    .    .    .    .    A covered tile with a flag on it.
  46.     140    .    .    .    .    .    .    .    A covered tile with a question mark on it.
  47.     141    .    .    .    .    .    .    .    A covered tile showing the user incorrectly marked a flag.
  48.     142    .    .    .    .    .    .    .    A tile showing a bomb on the grid, after losing game.
  49.  
  50.     You may also change the restart buttons.  The pixel width should be 20, and the height should be 60. Use the following resource ids.
  51.  
  52.     143    .    .    .    .    .    .    .    The restart button that is not depressed.*
  53.     144    .    .    .    .    .    .    .    The restart button, in a depressed state.*
  54.  
  55. * see also creating a Game Board Background PICT.
  56.  
  57.     A PICTURE PLUGGIN
  58.     You may change most of the pictures MineSweeper uses, excluding the "About' picture.  Not to keep harping on this, be EXTREMELY careful with your picture sizes.  A really nice picture can take A TON of memory.  ALWAYS, remove unused colors from your pictures before you make a resource with them.  There are several tools that you can do this with including Adobe Photoshop.  Removing unused colors typically reduces PICT size by about 66%!!!!!
  59.  
  60.     * Splash Screen.
  61.             Use resource id 128 in your pluggin.  MineSweeper will automatically resize the opening window to accommodate your picture without scaling it.
  62.  
  63.     * Score Board
  64.             Use resource id 131 to redesign a ScoreBoard.  Your picture should be 100 pixels wide and 200 pixels high. MineSweeper will use three rectangular regions of your scoreboard to update game information.  Ensure you have a three WHITE holes in your scoreboard.  In relative [left,top,right,bottom] format the regions are: 
  65. [ 19,  30, 83,  54 ], [ 18,  85, 82, 109 ], and [ 18, 151, 82, 175 ].  Make sure these rectangles are empty and you'll be fine.
  66.  
  67.     * Game Board Background
  68.             MineSweeper shades the background of the game window, primarily to go with the restart buttons.  You may change this, if you desire.  Since the window varies with size it is impossible to avoid scaling in all game levels.  If you use a solid color make your size extremely small, to conserve space, such as 1x1 or 2x2 pixels.  Use resource id 132.
  69.  
  70.     *Trophy Man Picture
  71.             If you want MineSweeper to display a different picture when displaying high scores create a PICT resource with an id of 999.  The picture should be 126 pixels wide and 301 pixels high for MineSweeper not to scale it.
  72.  
  73.         ADDITIONAL INFORMATION
  74.     If you are not familiar with using a resource editor, there are many good books that can show you the fundamentals.  You may EMAIL us with simple questions, and we will try to answer them barring time restraints.  We also have a PLUGGIN FAQ page on our WWW site which may be of assistance to you in your pluggin quest.  
  75.  
  76.         LEGAL STUFF
  77.     Anyone that is interested may create and distribute a MineSweeper Pluggin to the public.  These Pluggins may NOT be commercially sold, and for legal purposes they become the shared property of both the author and Smith Software Insight.  If an author requests a shareware fee, the fee must be less than or equal to the value of the software ($5.00) and the pluggin author, solely, remains entitled to 100% of the shareware fee.  
  78.     Anyone that creates and distributes a Pluggin should also EMAIL the Pluggin to Smith Software Insight at either "ssinsite@concentric.net" or "ssinsight@aol.com" or mail a disk containing the Pluggin to our registration address.  ( Sorry disks cannot be returned unless you include return postage! )  
  79.     Finally, you give Smith Software Insight exclusive permission to post any Pluggin ( including author's original documentation ) on our WWW site for public download and/or bundle the Pluggin with future releases of MineSweeper ( including author's original documentation ) at no cost to Smith Software Insight.
  80.